<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>macro</title>
</head>

<body>
    <!-- 定义宏 -->
    {% macro my_macro(name, password)%}
    用户名：<input type="text" value="{{name}}"><br>
    密码：<input type="password" value="{{password}}"><br>
    {% endmacro %}

    <!-- 调用当前文件宏 -->
    {{ my_macro("木婉清", '123456') }}

    <!-- 调用其他文件的宏 -->
    {% import 'Ademo07_other_macro.html' as other %}
    {{ other.my_input() }}
    {{ other.my_div() }}
</body>

</html>